﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MultiplyTableForProst
{
    public class NumericAndMultiplyTable
    {
        public int Numeric
        {
            get;
            set;
        }

        public List<MultiplyAB> MultiplyTable
        {
            get;
            private set;
        }

        public NumericAndMultiplyTable(int number)
        {
            Numeric = number;
            MultiplyTable = GetMultiplyTable(number);
        }

        private List<MultiplyAB> GetMultiplyTable(int number)
        {
            List<MultiplyAB> list = new List<MultiplyAB>();

            for (int i = 1; i <= 10; i++)
            {
                MultiplyAB mult = new MultiplyAB(number, i);
                list.Add(mult);
            }
            return list;
        }
    }
}
